package com.zygh.policeasset.utils;

import org.springframework.cglib.beans.BeanMap;

import java.util.Map;
/**
 * zhanguilin
 */
public class MapUtil {

    public static <T> T mapToBean(Map<String, String> map, T Purchase) {
        BeanMap beanMap = BeanMap.create(Purchase);
        beanMap.putAll(map);
        return Purchase;
    }

    public static <T> T mapToZnh(Map<String, Object> map, T Hardwit) {
        BeanMap beanMap = BeanMap.create(Hardwit);
        beanMap.putAll(map);
        return Hardwit;
    }

    public static <T> T mapToZns(Map<String, Object> map, T Softwit) {
        BeanMap beanMap = BeanMap.create(Softwit);
        beanMap.putAll(map);
        return Softwit;
    }

    public static <T> T mapToJc(Map<String, Object> map, T Basics) {
        BeanMap beanMap = BeanMap.create(Basics);
        beanMap.putAll(map);
        return Basics;
    }

    public static <T> T mapToDa(Map<String, Object> map, T DailyAsset) {
        BeanMap.create(DailyAsset).putAll(map);
        return DailyAsset;
    }

}
